[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Boxing memo's        Creating a variable length vertical line

 Once you have used either technique explained above to determine the
 approximate or exact number of lines occupied by the data in a
 word-wrapped character field, you can create a calculated field that
 produces a vertical line whose length varies as the number of lines
 varies. The trick to creating this field is to use the REPLICATE function
 to replicate the vertical line character as many times as there are lines
 of data and then to use the word-wrap field format to wrap this field down
 rather than across the page.

 To create this field, proceed as follows:

 1. Find out the ASCII number of the vertical line character you want to
    use by looking at your printer, font cartridge, or soft font manual.
    These manuals usually contain symbol set charts that assign a number
    from 33 to 254 to each printable character. For example, the chart of
    the IBM PC symbol set found in the HP LaserJet 11 manual shows that the
    number for the vertical bar character ( | ) is 179

 2. Create a calculated field (in this example, let's call it VLINE) that
    will replicate the vertical line character once for each line of your
    word-wrapped field. If the line character you are using is character
    number 179 (the single vertical bar), the expression for this field
    would be as follows, where LENGTH represents a calculated field that
    returns the numbcr of lines in the field you want to

       iif(LENGTH > 0, replicate(chr(179), LENGTH), chr(179) )

    Translated, this expressions means: "If the length of the word-wrapped
    field is greater than zero, print as many vertical line characters as
    there are lines in the word-wrapped field; otherwise, print one
    vertical line character". Use of the IIF function ensures that the
    calculated field takes inlo account blank values in the word-wrapped
    field; if the value is blank, the left and right sides of the box will
    consist of just one vertical line character.

 3. Place the word-wrapped field on your report layout. Use the F3 and
    Shift F3 keys to select and insert the horizontal line and corner
    characters for the box. Where you would insert the vertical line
    character (that is, immediately before and after the word-wrapped
    field), insert the VLINE calculated field you just created.

 4. Use the /Field Width command to set the width of the VLINE field to 1
    character. Use the /Field Format command to ielect a word-wrapped
    format. This width and format causes the field containing vertical bar
    characters to wrap down rather than across the page.


This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson